package com.lwgk.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.lwgk.R;

/**
 * created by 赵航
 * 联系微信 微信号：zhao--hang--
 * on 2019/7/11
 * --------------------------------------------------------------------------
 * 描述：自定义圆角，有按压效果哦，并且不能连续点击的按钮
 * 注意事项：
 */
public class FilletedCornerButton extends LinearLayout {
    private TextView mTextView;
    private LinearLayout mLinearLayout;

    public FilletedCornerButton(Context context) {
        super(context, null);
    }

    public FilletedCornerButton(Context context,  AttributeSet attrs) {
        super(context, attrs);
        initView(context);
    }

    public FilletedCornerButton(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs);
    }

    public FilletedCornerButton(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs);
    }

    private void initView(Context context) {
        View myView = View.inflate(context, R.layout.filleted_corner_view, this);
        mTextView = (TextView) myView.findViewById(R.id.button_text);
        mLinearLayout = (LinearLayout) myView.findViewById(R.id.light_button);
    }
}
